\hypertarget{mmc_8h}{}\section{fatfs.\+hal/mmc.h File Reference}
\label{mmc_8h}\index{fatfs.\+hal/mmc.\+h@{fatfs.\+hal/mmc.\+h}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc_8h_ab7771efbbd1a015b449d838d7f09959a}{wait\+\_\+ready} (\hyperlink{integer_8h_a36cb3b01d81ffd844bbbfb54003e06ec}{U\+I\+NT} wt)
\begin{DoxyCompactList}\small\item\em wait for card ready \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{diskio_8h_adba6790898ce4029c20a34b898ce73c1}{D\+S\+T\+A\+T\+US} \hyperlink{mmc_8h_af4049fbbcf364fc59886118c79895507}{mmc\+\_\+disk\+\_\+initialize} (void)
\begin{DoxyCompactList}\small\item\em Public Functions. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{diskio_8h_adba6790898ce4029c20a34b898ce73c1}{D\+S\+T\+A\+T\+US} \hyperlink{mmc_8h_ac14ea06e6b2ce5ad9808db3c205db5e6}{mmc\+\_\+disk\+\_\+status} (void)
\begin{DoxyCompactList}\small\item\em Get Disk Status. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{diskio_8h_aacdfef1dad6565f65c26d12fe0ea4b2b}{D\+R\+E\+S\+U\+LT} \hyperlink{mmc_8h_a41eabb26301eb16450258417ed137d67}{mmc\+\_\+disk\+\_\+read} (\hyperlink{integer_8h_a4ae1dab0fb4b072a66584546209e7d58}{B\+Y\+TE} $\ast$buff, \hyperlink{integer_8h_ad342ac907eb044443153a22f964bf0af}{D\+W\+O\+RD} sector, \hyperlink{integer_8h_a36cb3b01d81ffd844bbbfb54003e06ec}{U\+I\+NT} count)
\begin{DoxyCompactList}\small\item\em Read Sector(s) \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{diskio_8h_aacdfef1dad6565f65c26d12fe0ea4b2b}{D\+R\+E\+S\+U\+LT} \hyperlink{mmc_8h_ab065915810044044697ca00bb6bc45c5}{mmc\+\_\+disk\+\_\+write} (const \hyperlink{integer_8h_a4ae1dab0fb4b072a66584546209e7d58}{B\+Y\+TE} $\ast$buff, \hyperlink{integer_8h_ad342ac907eb044443153a22f964bf0af}{D\+W\+O\+RD} sector, \hyperlink{integer_8h_a36cb3b01d81ffd844bbbfb54003e06ec}{U\+I\+NT} count)
\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{diskio_8h_aacdfef1dad6565f65c26d12fe0ea4b2b}{D\+R\+E\+S\+U\+LT} \hyperlink{mmc_8h_acbcb6fef21740379e9fdd989b16ab04a}{mmc\+\_\+disk\+\_\+ioctl} (\hyperlink{integer_8h_a4ae1dab0fb4b072a66584546209e7d58}{B\+Y\+TE} cmd, void $\ast$buff)
\item 
void \hyperlink{mmc_8h_a34555655fe13a47c95b35a2c13b85847}{mmc\+\_\+disk\+\_\+timerproc} (void)
\begin{DoxyCompactList}\small\item\em Write Sector(s) \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function Documentation}
\index{mmc.\+h@{mmc.\+h}!mmc\+\_\+disk\+\_\+initialize@{mmc\+\_\+disk\+\_\+initialize}}
\index{mmc\+\_\+disk\+\_\+initialize@{mmc\+\_\+disk\+\_\+initialize}!mmc.\+h@{mmc.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+disk\+\_\+initialize(void)}{mmc_disk_initialize(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf D\+S\+T\+A\+T\+US} mmc\+\_\+disk\+\_\+initialize (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc_8h_af4049fbbcf364fc59886118c79895507}{}\label{mmc_8h_af4049fbbcf364fc59886118c79895507}


Public Functions. 

Initialize Disk Drive \begin{DoxyReturn}{Returns}
Stat 
\end{DoxyReturn}


Definition at line 340 of file mmc.\+c.



Referenced by disk\+\_\+initialize().

\index{mmc.\+h@{mmc.\+h}!mmc\+\_\+disk\+\_\+ioctl@{mmc\+\_\+disk\+\_\+ioctl}}
\index{mmc\+\_\+disk\+\_\+ioctl@{mmc\+\_\+disk\+\_\+ioctl}!mmc.\+h@{mmc.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+disk\+\_\+ioctl(\+B\+Y\+T\+E cmd, void $\ast$buff)}{mmc_disk_ioctl(BYTE cmd, void *buff)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf D\+R\+E\+S\+U\+LT} mmc\+\_\+disk\+\_\+ioctl (
\begin{DoxyParamCaption}
\item[{{\bf B\+Y\+TE}}]{cmd, }
\item[{void $\ast$}]{buff}
\end{DoxyParamCaption}
)}\hypertarget{mmc_8h_acbcb6fef21740379e9fdd989b16ab04a}{}\label{mmc_8h_acbcb6fef21740379e9fdd989b16ab04a}


Referenced by disk\+\_\+ioctl(), and mmc\+\_\+disk\+\_\+read().

\index{mmc.\+h@{mmc.\+h}!mmc\+\_\+disk\+\_\+read@{mmc\+\_\+disk\+\_\+read}}
\index{mmc\+\_\+disk\+\_\+read@{mmc\+\_\+disk\+\_\+read}!mmc.\+h@{mmc.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+disk\+\_\+read(\+B\+Y\+T\+E $\ast$buff, D\+W\+O\+R\+D sector, U\+I\+N\+T count)}{mmc_disk_read(BYTE *buff, DWORD sector, UINT count)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf D\+R\+E\+S\+U\+LT} mmc\+\_\+disk\+\_\+read (
\begin{DoxyParamCaption}
\item[{{\bf B\+Y\+TE} $\ast$}]{buff, }
\item[{{\bf D\+W\+O\+RD}}]{sector, }
\item[{{\bf U\+I\+NT}}]{count}
\end{DoxyParamCaption}
)}\hypertarget{mmc_8h_a41eabb26301eb16450258417ed137d67}{}\label{mmc_8h_a41eabb26301eb16450258417ed137d67}


Read Sector(s) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em buff} & read buffer \\
\hline
\mbox{\tt in}  & {\em sector} & start sector number \\
\hline
\mbox{\tt in}  & {\em count} & sector count \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 ok 

non zero error 
\end{DoxyReturn}


Definition at line 433 of file mmc.\+c.



Referenced by disk\+\_\+read().

\index{mmc.\+h@{mmc.\+h}!mmc\+\_\+disk\+\_\+status@{mmc\+\_\+disk\+\_\+status}}
\index{mmc\+\_\+disk\+\_\+status@{mmc\+\_\+disk\+\_\+status}!mmc.\+h@{mmc.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+disk\+\_\+status(void)}{mmc_disk_status(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf D\+S\+T\+A\+T\+US} mmc\+\_\+disk\+\_\+status (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc_8h_ac14ea06e6b2ce5ad9808db3c205db5e6}{}\label{mmc_8h_ac14ea06e6b2ce5ad9808db3c205db5e6}


Get Disk Status. 

\begin{DoxyReturn}{Returns}
Stat 

S\+T\+A\+\_\+\+N\+O\+I\+N\+IT if no drive 
\end{DoxyReturn}


Definition at line 420 of file mmc.\+c.



Referenced by disk\+\_\+status().

\index{mmc.\+h@{mmc.\+h}!mmc\+\_\+disk\+\_\+timerproc@{mmc\+\_\+disk\+\_\+timerproc}}
\index{mmc\+\_\+disk\+\_\+timerproc@{mmc\+\_\+disk\+\_\+timerproc}!mmc.\+h@{mmc.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+disk\+\_\+timerproc(void)}{mmc_disk_timerproc(void)}}]{\setlength{\rightskip}{0pt plus 5cm}void mmc\+\_\+disk\+\_\+timerproc (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{mmc_8h_a34555655fe13a47c95b35a2c13b85847}{}\label{mmc_8h_a34555655fe13a47c95b35a2c13b85847}


Write Sector(s) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt out}  & {\em buff} & write buffer \\
\hline
\mbox{\tt in}  & {\em sector} & start sector number \\
\hline
\mbox{\tt in}  & {\em count} & sector count \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 ok 

non zero error Miscellaneous Functions 
\end{DoxyReturn}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em cmd} & Control code \\
\hline
 & {\em \mbox{[}in$\vert$out\mbox{]}} & buff\+: Send/\+Receive buffer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
result mmc timer processes 
\end{DoxyReturn}


Definition at line 708 of file mmc.\+c.



Referenced by disk\+\_\+timerproc(), and mmc\+\_\+task().

\index{mmc.\+h@{mmc.\+h}!mmc\+\_\+disk\+\_\+write@{mmc\+\_\+disk\+\_\+write}}
\index{mmc\+\_\+disk\+\_\+write@{mmc\+\_\+disk\+\_\+write}!mmc.\+h@{mmc.\+h}}
\subsubsection[{\texorpdfstring{mmc\+\_\+disk\+\_\+write(const B\+Y\+T\+E $\ast$buff, D\+W\+O\+R\+D sector, U\+I\+N\+T count)}{mmc_disk_write(const BYTE *buff, DWORD sector, UINT count)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf D\+R\+E\+S\+U\+LT} mmc\+\_\+disk\+\_\+write (
\begin{DoxyParamCaption}
\item[{const {\bf B\+Y\+TE} $\ast$}]{buff, }
\item[{{\bf D\+W\+O\+RD}}]{sector, }
\item[{{\bf U\+I\+NT}}]{count}
\end{DoxyParamCaption}
)}\hypertarget{mmc_8h_ab065915810044044697ca00bb6bc45c5}{}\label{mmc_8h_ab065915810044044697ca00bb6bc45c5}


Referenced by disk\+\_\+write(), and mmc\+\_\+disk\+\_\+read().

\index{mmc.\+h@{mmc.\+h}!wait\+\_\+ready@{wait\+\_\+ready}}
\index{wait\+\_\+ready@{wait\+\_\+ready}!mmc.\+h@{mmc.\+h}}
\subsubsection[{\texorpdfstring{wait\+\_\+ready(\+U\+I\+N\+T wt)}{wait_ready(UINT wt)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int wait\+\_\+ready (
\begin{DoxyParamCaption}
\item[{{\bf U\+I\+NT}}]{wt}
\end{DoxyParamCaption}
)}\hypertarget{mmc_8h_ab7771efbbd1a015b449d838d7f09959a}{}\label{mmc_8h_ab7771efbbd1a015b449d838d7f09959a}


wait for card ready 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em wt} & ms to wait \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 Ready 

0 Timeout 
\end{DoxyReturn}


Definition at line 169 of file mmc.\+c.



Referenced by mmc\+\_\+disk\+\_\+read(), rcvr\+\_\+datablock(), and select().

